define(["../logic/addlabel","../components/commonCtl"],function(pluginClass,c){
    return {
        pluginClass:pluginClass,
        style:{
            backgroundColor:"#f0f4f6"
        },
        root:["page_content"],
        components:{
            page_content:{
              type:"view",
              style:{
                flex:1,
                paddingBottom:40,
              },
              root:["subwrapper"]
            },
            subwrapper:{
              type:"view",
              style:{
                flexDirection:"column",
                backgroundColor:"#fff",
                paddingLeft:17
              },
              root:["addedLabelTitle","addLabelRepeat","historyLabelTitle","historyLabelRepeat"]
            },
            historyLabelRepeat:{
              type:"repeat",
              items:[],
              style:{
                marginTop:14,
                marginBottom:16,
                flexWrap:"wrap"
              },
              itemStyle:{
                float:"left",
                marginBottom:10
              },
              root:["historyLabel"],
              nodata:"historyNoData"
            },
            historyNoData:{
              type:"text",
              text:"暂无历史标签记录",
              style:{
                flex:1,
                justifyContent:"center",
                fontSize:13,
                color:c.seTitleColor,
                textAlign:"center",
              }
            },
            historyLabel:{
              type:"text",
              text_bind:"title",
              text:"历史标签",
              style:c.historyLableStyle,
            },
            addLabelRepeat:{
              type:"repeat",
              ref:true,
              subComponentAlwaysShow:true,
              style:{
                flexDirection:"row",
                flexWrap:"wrap",
                alignItems:"flex-start",
                marginTop:22,
                marginBottom:30
              },
              itemStyle:{
                marginBottom:10
              },
              items:[],
              root:["candeleteLabel","delteIcon"],
              subComponent:"addLabelBtn"
            },
            addLabelBtn:{
              type:"icon",
              text:"+添加",
              style:{
                border:"1px dashed #CCCCCC",
                padding:"6 16",
                width:70,
                marginRight:10,
                borderRadius:"15px",
              },
              textStyle:{
                color:"#73D51C",
                fontSize:14
              }
            },
            delteIcon:{
              type:"icon",
              font:"icomoon_e909",
              iconStyle:{
                color:"#FF4E5B",
                backgroundColor:"#fff"
              },
              style:{
                position:"absolute",
                right:10,
                top:-5
              }
            },
            candeleteLabel:{
              type:"text",
              text_bind:"title",
              text:"添加的标签",
              style:{
                fontSize:14,
                padding:"6 16",
                borderRadius:"15px",
                marginRight:10,
                 backgroundColor:"rgba(255,169,47,.1)",
               color:"#FFA92F",
              },
            },
            labelInput:{
              type:"input",
              placeholder:"输入标签(8个字以内)",
              style:{
                width:"92%",
                paddingLeft:10,
                margin:"auto",
                fontSize:16,
                height:45,
                border:"none",
                backgroundColor:"#F2F3F4",
                borderRadius:"4px"
              }
            },
            addedLabelTitle:{
              type:"text",
              text:"已加入标签",
              nextText:" (最多选择5个)",
              style:{
                color:c.descColor,
                fontSize:13,
                paddingTop:13,
              },
              nextTextStyle:{
                color:c.seTitleColor,
                fontSize:13
              }
            },
            historyLabelTitle:{
              type:"text",
              style:{
                color:c.descColor,
                fontSize:13
              },
              text:"历史标签"
            }
        }
    };
});
